import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

///错误提示样式
void showWarnToast(String msg) {
  Fluttertoast.showToast(
      msg: msg,
      toastLength: Toast.LENGTH_LONG,
      gravity: ToastGravity.CENTER,
      backgroundColor: Colors.red,
      textColor: Colors.white);
}

/// 普通提示样式 toast
void showToast(String msg, {ToastGravity? gravity = ToastGravity.CENTER}) {
  Fluttertoast.showToast(
      msg: msg, toastLength: Toast.LENGTH_LONG, gravity: gravity);
}
